
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>DifferentialDisplacement &#8212; atomman 1.4.0 documentation</title>
    <link rel="stylesheet" href="_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/language_data.js"></script>
    <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="SDVPN" href="atomman.defect.SDVPN.html" />
    <link rel="prev" title="Dislocation" href="atomman.defect.Dislocation.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="atomman.defect.SDVPN.html" title="SDVPN"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="atomman.defect.Dislocation.html" title="Dislocation"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="atomman.html" >atomman package</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="atomman.defect.html" accesskey="U">defect</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="differentialdisplacement">
<h1>DifferentialDisplacement<a class="headerlink" href="#differentialdisplacement" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="atomman.defect.DifferentialDisplacement">
<em class="property">class </em><code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">DifferentialDisplacement</code><span class="sig-paren">(</span><em class="sig-param">system_0</em>, <em class="sig-param">system_1</em>, <em class="sig-param">neighbors=None</em>, <em class="sig-param">cutoff=None</em>, <em class="sig-param">reference=1</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.DifferentialDisplacement" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<dl class="method">
<dt id="atomman.defect.DifferentialDisplacement.arrowcenters">
<em class="property">property </em><code class="sig-name descname">arrowcenters</code><a class="headerlink" href="#atomman.defect.DifferentialDisplacement.arrowcenters" title="Permalink to this definition">¶</a></dt>
<dd><p>The identified center positions for the ddvectors.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.array or <a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.9)">None</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.DifferentialDisplacement.arrowuvectors">
<em class="property">property </em><code class="sig-name descname">arrowuvectors</code><a class="headerlink" href="#atomman.defect.DifferentialDisplacement.arrowuvectors" title="Permalink to this definition">¶</a></dt>
<dd><p>The unit vectors between all pairs of atoms for which the ddvectors have been computed.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.array or <a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.9)">None</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.DifferentialDisplacement.ddvectors">
<em class="property">property </em><code class="sig-name descname">ddvectors</code><a class="headerlink" href="#atomman.defect.DifferentialDisplacement.ddvectors" title="Permalink to this definition">¶</a></dt>
<dd><p>The computed differential displacement vectors.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.array or <a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.9)">None</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.DifferentialDisplacement.neighbors">
<em class="property">property </em><code class="sig-name descname">neighbors</code><a class="headerlink" href="#atomman.defect.DifferentialDisplacement.neighbors" title="Permalink to this definition">¶</a></dt>
<dd><p>The list of neighbors identified for the reference system.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference internal" href="atomman.NeighborList.html#atomman.NeighborList" title="atomman.NeighborList">atomman.NeighborList</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.DifferentialDisplacement.plot">
<code class="sig-name descname">plot</code><span class="sig-paren">(</span><em class="sig-param">component</em>, <em class="sig-param">ddmax</em>, <em class="sig-param">plotxaxis='x'</em>, <em class="sig-param">plotyaxis='y'</em>, <em class="sig-param">xlim=None</em>, <em class="sig-param">ylim=None</em>, <em class="sig-param">zlim=None</em>, <em class="sig-param">arrowscale=1</em>, <em class="sig-param">arrowwidth=0.005</em>, <em class="sig-param">use0z=False</em>, <em class="sig-param">atomcolor=None</em>, <em class="sig-param">atomcmap=None</em>, <em class="sig-param">atomsize=0.5</em>, <em class="sig-param">figsize=10</em>, <em class="sig-param">matplotlib_axes=None</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.DifferentialDisplacement.plot" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a matplotlib figure of a differential displacement map.  Atom
positions are represented as circles, while the selected components of the
differential displacement vectors are plotted as arrows.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>component</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em> or </em><em>array-like object</em>) – Indicates the component(s) of the differential displacement to plot.
Values of ‘x’, ‘y’, or ‘z’ will plot the component along that
Cartesian direction.  A value of ‘projection’ will plot the
differential displacement vectors as projected onto the plotting
plane, thereby showing the two components perpendicular to the line
direction.  If a 3D vector is given, then the component parallel to
that direction will be used.</p></li>
<li><p><strong>ddmax</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.9)"><em>None</em></a>) – The maximum differential displacement value allowed. Values will be
kept between +-ddmax by wrapping values with larger absolute values
around by adding/subtracting 2*ddmax. Typically, this is set to be
|b|/2, but can be defect-specific. For instance, fcc a/2&lt;110&gt;
dislocations and basal hcp dislocations are typically plotted with
ddmax=|b|/4.  If set to None, then no wrapping is done.</p></li>
<li><p><strong>plotxaxis</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em> or </em><em>array-like object</em><em>, </em><em>optional</em>) – Indicates the Cartesian direction associated with the system’s atomic
coordinates to align with the plotting x-axis.  Values are either 3D
unit vectors, or strings ‘x’, ‘y’, or ‘z’ for the Cartesian axes
directions.  plotxaxis and plotyaxis must be orthogonal.  Default value
is ‘x’ = [1, 0, 0].</p></li>
<li><p><strong>plotyaxis</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em> or </em><em>array-like object</em><em>, </em><em>optional</em>) – Indicates the Cartesian direction associated with the system’s atomic
coordinates to align with the plotting y-axis.  Values are either 3D
unit vectors, or strings ‘x’, ‘y’, or ‘z’ for the Cartesian axes
directions.  plotxaxis and plotyaxis must be orthogonal.  Default value
is ‘y’ = [0, 1, 0].</p></li>
<li><p><strong>xlim</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.9)"><em>tuple</em></a><em>, </em><em>optional</em>) – The minimum and maximum coordinates along the plotting x-axis to
include in the fit.  Values are taken in the specified length_unit.
If not given, then the limits are set based on min and max atomic
coordinates along the plotting axis.</p></li>
<li><p><strong>ylim</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.9)"><em>tuple</em></a><em>, </em><em>optional</em>) – The minimum and maximum coordinates along the plotting y-axis to
include in the fit.  Values are taken in the specified length_unit.
If not given, then the limits are set based on min and max atomic
coordinates along the plotting axis.</p></li>
<li><p><strong>zlim</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.9)"><em>tuple</em></a><em>, </em><em>optional</em>) – The minimum and maximum coordinates normal to the plotting axes
(i.e. plotxaxis X plotyaxis) to include in the fit.  Values are taken
in the specified length_unit.  The optimum zlim should encompass only
a single periodic slice.  If not given, then the limits are set
based on min and max atomic coordinates along the axis.</p></li>
<li><p><strong>arrowscale</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Scaling factor for the magnitude of the differential displacement
arrows.  Default value is 1: no scaling, vectors are in units of length.
For major components, this is often set such that the max differential
displacement compoent after wrapping (see ddmax) is scaled to the
distance between the atom pairs in the plot.  For minor components, this
is often set to a large value simply to make the components visible.</p></li>
<li><p><strong>arrowwidth</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Scaling factor to use for the width of the plotted arrows. Default value is
0.005 = 1/200.</p></li>
<li><p><strong>use0z</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – If False (default), the z coordinates from the reference system will be
used for zlim and atomcmap colors. If True, the z coordinates will be
used from system0 even if system1 is the reference system.</p></li>
<li><p><strong>atomcolor</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)"><em>list</em></a><em>, </em><em>optional</em>) – Matplotlib color name(s) to use to display the atoms.  If str, that
color will be assigned to all atypes.  If list, must give a color value
or None for each atype.  Default value (None) will use cmap instead.
Note: atomcolor and atomcmap can be used together as long as exactly
one color or cmap is given for each unique atype.</p></li>
<li><p><strong>atomcmap</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)"><em>list</em></a><em>, </em><em>optional</em>) – Matplotlib colormap name(s) to use to display the atoms.  Atoms will
be colored based on their initial positions and scaled using zlim. If
str, that cmap will be assigned to all atypes.  If list, must give a
cmap value or None for each atype.  Default value (None) will use ‘hsv’
cmap.  Note: atomcolor and atomcmap can be used together as long as
exactly one color or cmap is given for each unique atype.</p></li>
<li><p><strong>atomsize</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The circle radius size to use for the plotted atom positions in units of
length.  Default value is 0.5.</p></li>
<li><p><strong>figsize</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.9)"><em>tuple</em></a><em>, </em><em>optional</em>) – Specifies the size of the figure to create in inches.  If a single value
is given, it will be used for the figure’s width, and the height will be
scaled based on the xlim and ylim values.  Alternatively, both the width
and height can be set by passing a tuple of two values, but the plot will
not be guaranteed to be “regular” with respect to length dimensions.</p></li>
<li><p><strong>matplotlib_axes</strong> (<em>matplotlib.Axes.axes</em><em>, </em><em>optional</em>) – An existing matplotlib axes object. If given, the differential displacement
plot will be added to the specified axes of an existing figure.  This
allows for subplots to be constructed.  Note that figsize will be ignored
as the figure would have to be created beforehand and no automatic
optimum scaling of the figure’s dimensions will occur.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The generated figure.  Not returned if matplotlib_axes is given.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>matplotlib.Figure</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.DifferentialDisplacement.reference">
<em class="property">property </em><code class="sig-name descname">reference</code><a class="headerlink" href="#atomman.defect.DifferentialDisplacement.reference" title="Permalink to this definition">¶</a></dt>
<dd><p>Indicates which system (0 or 1) is used as the reference.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)">int</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.DifferentialDisplacement.solve">
<code class="sig-name descname">solve</code><span class="sig-paren">(</span><em class="sig-param">system0=None</em>, <em class="sig-param">system1=None</em>, <em class="sig-param">neighbors=None</em>, <em class="sig-param">cutoff=None</em>, <em class="sig-param">reference=None</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.DifferentialDisplacement.solve" title="Permalink to this definition">¶</a></dt>
<dd><p>Solves the differential displacement vectors.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system0</strong> (<em>atomman.system</em>) – The base/reference system to use.</p></li>
<li><p><strong>system1</strong> (<em>atomman.system</em>) – The defect/current system to use.</p></li>
<li><p><strong>neighbors</strong> (<a class="reference internal" href="atomman.NeighborList.html#atomman.NeighborList" title="atomman.NeighborList"><em>atomman.NeighborList</em></a><em>, </em><em>optional</em>) – The neighbor list to use.</p></li>
<li><p><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Cutoff distance for computing a neighbor list. If reference = 0, then system_0
will be used to generate the list. If reference = 1, then system_1 will be
used to generate the list.</p></li>
<li><p><strong>reference</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)"><em>int</em></a><em>, </em><em>optional</em>) – Indicates which of the two systems should be used for the plotting reference: 0 or 1.
If 0 (default), then system0’s atomic positions will be used for the calculation and
neighbors should be for system0.  If 1, then system1’s atomic positions will be used
for the calculation and neighbors should be for system1.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.DifferentialDisplacement.system0">
<em class="property">property </em><code class="sig-name descname">system0</code><a class="headerlink" href="#atomman.defect.DifferentialDisplacement.system0" title="Permalink to this definition">¶</a></dt>
<dd><p>The defect-free base system.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System">atomman.System</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.DifferentialDisplacement.system1">
<em class="property">property </em><code class="sig-name descname">system1</code><a class="headerlink" href="#atomman.defect.DifferentialDisplacement.system1" title="Permalink to this definition">¶</a></dt>
<dd><p>The defect containing system.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System">atomman.System</a></p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="atomman.defect.Dislocation.html"
                        title="previous chapter">Dislocation</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="atomman.defect.SDVPN.html"
                        title="next chapter">SDVPN</a></p>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="atomman.defect.SDVPN.html" title="SDVPN"
             >next</a> |</li>
        <li class="right" >
          <a href="atomman.defect.Dislocation.html" title="Dislocation"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="atomman.html" >atomman package</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="atomman.defect.html" >defect</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0.
    </div>
  </body>
</html>